import Login from '../../pages/Login/index'
import Layout from '../../pages/GeekLayout/GeekLayout'
import { Link, createBrowserRouter } from "react-router-dom";
import Artcile from '../pages/Layout/Artcile'
import Admin from '../pages/Layout/Admin'
import Content from '../pages/Layout/Content'




const routes = createBrowserRouter([
    {
        path: "/home",
        element: <Layout />,
        children: [
            {
                path: 'content',
                element: <Content />,
                handle: {
                    title: "数据概览"
                }
            },
            {
                path: "artcile",
                element: <Artcile />,
                handle: {
                    title: "内容管理"
                }
            },
            {
                path: 'admin',
                element: <Admin />,
                handle: {
                    title: "发布文章"
                }
            }
        ]
    },
    {
        path: "/login",
        element: <Login />
    },
    {
        path: "/",
        element: <Navigate to={'/login'} />
    }
])

export default routes